package com.zwf.config;

import com.zwf.constant.FileConstant;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.nio.file.Path;

@Configuration
public class LuceneConfig {

    private final Path indexPath = FileConstant.fullLuceneIndexPath;

    @Bean
    public Path luceneIndexPath() {return indexPath;}

    @Bean
    public Analyzer standardAnalyzer() {return new StandardAnalyzer();}
}
